package cc.admin.modules.wea.entity;

import java.io.Serializable;
import java.util.Date;

import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import cc.admin.poi.excel.annotation.Excel;
import cc.admin.common.aspect.annotation.Dict;

/**
 * @Description: 极端天气预警记录
 * @Author: cc-admin
 * @Date:   2024-08-27
 * @Version: V1.0.0
 */
@Data
@TableName("wea_weather_warning")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="wea_weather_warning对象", description="极端天气预警记录")
public class WeaWeatherWarning {

	/**编号*/
	@Excel(name = "编号", width = 15)
    @ApiModelProperty(value = "编号")
	private String id;
	/**平台id*/
	@Excel(name = "平台id", width = 15)
    @ApiModelProperty(value = "平台id")
	private String platformId;
	/**预警状态*/
	@Excel(name = "预警状态", width = 15)
    @ApiModelProperty(value = "预警状态")
	private String alertStatus;
	/**区域*/
	@Excel(name = "区域", width = 15)
    @ApiModelProperty(value = "区域")
	private String area;
	/**城市*/
	@Excel(name = "城市", width = 15)
    @ApiModelProperty(value = "城市")
	private String city;
	/**内容*/
	@Excel(name = "内容", width = 15)
    @ApiModelProperty(value = "内容")
	private String content;
	/**预警位置*/
	@Excel(name = "预警位置", width = 15)
    @ApiModelProperty(value = "预警位置")
	private String location;
	/**省份*/
	@Excel(name = "省份", width = 15)
    @ApiModelProperty(value = "省份")
	private String province;
	/**发布时间*/
	@Excel(name = "发布时间", width = 15)
    @ApiModelProperty(value = "发布时间")
	private Date releaseDate;
	/**发布来源*/
	@Excel(name = "发布来源", width = 15)
    @ApiModelProperty(value = "发布来源")
	private String releaseSource;
	/**标题*/
	@Excel(name = "标题", width = 15)
    @ApiModelProperty(value = "标题")
	private String title;
	/**预警级别*/
	@Excel(name = "预警级别", width = 15)
    @ApiModelProperty(value = "预警级别")
	private String warningLevel;
	/**预警类型*/
	@Excel(name = "预警类型", width = 15)
    @ApiModelProperty(value = "预警类型")
	private String type;
	/**企业id*/
	@Excel(name = "企业id", width = 15)
	@ApiModelProperty(value = "企业id")
	private String tenantId;

	public WeaWeatherWarning() {}



    public WeaWeatherWarning(JSONObject jsonData) {
		this.id = jsonData.getString("id");
		this.platformId = jsonData.getString("platformId");
		this.alertStatus = jsonData.getString("alertStatus");
		this.area = jsonData.getString("area");
		this.city = jsonData.getString("city");
		this.content = jsonData.getString("content");
		this.location = jsonData.getString("location");
		this.province = jsonData.getString("province");
		this.releaseDate = jsonData.getDate("releaseDate");
		this.releaseSource = jsonData.getString("releaseSource");
		this.title = jsonData.getString("title");
		this.warningLevel = jsonData.getString("warningLevel");
		this.type = jsonData.getString("type");
    }
}
